package com.tek.ding.faceding.presenter.login;

import com.tek.ding.faceding.bean.AppVersion;
import com.tek.ding.faceding.bean.BaseBean;
import com.tek.ding.faceding.bean.Staff;
import com.tek.ding.faceding.bean.Store;
import com.tek.ding.faceding.network.HttpClient;

import java.util.List;

import io.reactivex.rxjava3.core.Observable;

public class LoginModel implements LoginContract.ILoginModel {

    @Override
    public Observable<BaseBean<Staff>> login(String storeUid, String username, String password) {
        return HttpClient.Builder.getApiService().login(storeUid, username, password);
    }

    @Override
    public Observable<BaseBean<AppVersion>> checkNewVersionV2(String storeUid, String address, String lng, String lat) {
        return HttpClient.Builder.getApiService().checkNewVersionV2(storeUid, address, lng, lat);
    }

    @Override
    public Observable<BaseBean<List<Store>>> getStaffStores(String storeUid, String username) {
        return HttpClient.Builder.getApiService().getStaffStores(storeUid, username);
    }

}
